package org.example.ruangong.util;

import java.util.HashMap;
import java.util.Map;

public class ResponseUtil {

    public static Map<String, Object> createResponse(int status, Object data, String message) {
        Map<String, Object> response = new HashMap<>();
        response.put("status", status);
        response.put("data", data);
        response.put("message", message);
        return response;
    }

    public static Map<String, Object> success(Object data, String message) {
        return createResponse(200, data, message);
    }

    public static Map<String, Object> error(int status, String message) {
        return createResponse(status, null, message);
    }
}
